******Stata commands for "Correlates of Aggregate Support for the Radical Right in Portugal"*******


*Table 1 Models (OLS) 
eststo clear
eststo controls: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo groupconflict: quietly reg percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo economic: quietly reg percentventura rmgrsi2019 ganho changeganho20102018 unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo fullmodel: quietly reg percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo interaction1: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018 change_unemployment_2015_2020 percent_ihru_cont house_price house_price_2017_2020 c.imigrantspercent##c.unemployed122020_pop
eststo interaction2: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 c.percent_ihru_cont##c.rmgrsi2019
esttab controls economic groupconflict fullmodel interaction1 interaction2 using Table1.rtf, r2 se label wide replace title (OLS regression estimates predicting radical right vote share across Portuguese municipalities in the 2021 Presidential election) mtitles ("Model 1" "Model 2" "Model 3"  "Model 4" "Model 5" "Model 6")


* Figure 2: Margin Plots for main effects (A)
reg percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
margins, at (percent_ihru_cont =(0(1)7))
marginsplot

* Figure 2: Margin Plots for main effects (B)
reg percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
margins, at (rmgrsi2019 =(0(1)20))
marginsplot

*Figure 3: Marginal effects for interactions (A)
reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 c.percent_ihru_cont##c.rmgrsi2019
margins, at(rmgrsi2019=(0(5)20) percent_ihru_cont=(0(5)5)) vsquish
marginsplot, legend(position(6))

*Figure 3: Marginal effects for interactions (B)
reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 c.percent_ihru_cont##c.rmgrsi2019
margins, at(percent_ihru_cont=(0(1)7) rmgrsi2019=(0(10)20)) vsquish
marginsplot, legend(position(6))



*Appendix/Robustness Tests


*Table A1: Summary of Variables
asdoc sum percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid, label replace


* Table of Correlations
asdoc cor percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid, label replace


*Testing for multicollinearity (not shown)
reg percentventura i.ciganos_ihru imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop house_price population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
vif


****Robustness Tests

*Table A3 (Tobit) 
eststo clear
eststo controls: quietly tobit percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo groupconflict: quietly tobit percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo economic: quietly tobit percentventura rmgrsi2019 ganho changeganho20102018 unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo fullmodel: quietly tobit percentventura percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo interaction1: quietly tobit percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018 change_unemployment_2015_2020 percent_ihru_cont house_price house_price_2017_2020 c.imigrantspercent##c.unemployed122020_pop
eststo interaction2: quietly tobit percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 c.percent_ihru_cont##c.rmgrsi2019
esttab controls economic groupconflict fullmodel interaction1 interaction2 using Appendix_Table1.rtf, r2 se label wide replace title (OLS regression estimates predicting radical right vote share across Portuguese municipalities in the 2021 Presidential election) mtitles ("Model 1" "Model 2" "Model 3"  "Model 4" "Model 5" "Model 6")


*Table A4 (Roma Dummy Variable) 
eststo clear
eststo controls: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo groupconflict: quietly reg percentventura roma_dummy imigrantspercent migrantchange20102019 percentafricannationals population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo economic: quietly reg percentventura rmgrsi2019 ganho changeganho20102018 unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid 
eststo fullmodel: quietly reg percentventura roma_dummy imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid
eststo interaction1: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018 change_unemployment_2015_2020 roma_dummy house_price house_price_2017_2020 c.imigrantspercent##c.unemployed122020_pop
eststo interaction2: quietly reg percentventura population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 log_covid imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018  unemployed122020_pop change_unemployment_2015_2020 house_price house_price_2017_2020 c.roma_dummy##c.rmgrsi2019
esttab controls economic groupconflict fullmodel interaction1 interaction2 using Appendix_Table2.rtf, r2 se label wide replace title (OLS regression estimates predicting radical right vote share across Portuguese municipalities in the 2021 Presidential election (Roma dummy variable)) mtitles ("Model 1" "Model 2" "Model 3"  "Model 4" "Model 5" "Model 6")



*Table A5 (same analyses for Parliamentary election 2019 ) 
eststo clear
eststo controls: quietly reg percentchega2019 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019
eststo groupconflict: quietly reg percentchega2019 percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 
eststo economic: quietly reg percentchega2019 rmgrsi2019 ganho changeganho20102018 desemprego2019 change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 
eststo fullmodel: quietly reg percentchega2019 percent_ihru_cont imigrantspercent migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018  desemprego2019 change_unemployment_2015_2020 house_price house_price_2017_2020 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019
eststo interaction1: quietly reg percentchega2019 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 migrantchange20102019 percentafricannationals rmgrsi2019 ganho changeganho20102018 change_unemployment_2015_2020 percent_ihru_cont house_price house_price_2017_2020 c.imigrantspercent##c.desemprego2019
eststo interaction2: quietly reg percentchega2019 population1000 secondary envelhecimento crimerate1000_2019 popdensity2019 imigrantspercent migrantchange20102019 percentafricannationals ganho changeganho20102018 desemprego2019 change_unemployment_2015_2020 house_price house_price_2017_2020 c.percent_ihru_cont##c.rmgrsi2019
esttab controls economic groupconflict fullmodel interaction1 interaction2 using TableA5.rtf, r2 se label wide replace title (OLS regression estimates predicting radical right vote share across Portuguese municipalities in the 2019 Parliamentary election) mtitles ("Model 1" "Model 2" "Model 3"  "Model 4" "Model 5" "Model 6")












